import behaviors from "../../../../config/behaviors";


// 商家推荐, 轮播图
Component({
  behaviors: [behaviors],
  properties: {
    list: Array
  },
  data: {},
  methods: {
    handleClick(event) {
      const item = event.currentTarget.dataset.item
      // console.log(item.url)
      if (item && item.url && item.url.length > 1) {
        if (item.url.indexOf('switchTab') !== -1) {
          const url = item.url.replace('switchTab', '')
          console.log(url)
          wx.switchTab({
            url
          })
        } else {
          wx.navigateTo({
            url: item.url
          })
        }

      }
    }
  }
});
